<?php

declare(strict_types=1);

namespace App\CustHub\Request;

use Mine\MineFormRequest;

class TransferRecordRequest extends MineFormRequest
{
    public function saveRules()
    {
        return [
            'remittance_account' => 'required',
            'amount' =>  'required|numeric|min:0|not_in:0',
            'contact' => 'required|mobile'
        ];
    }

    public function attributes(): array
    {
        return [
            'remittance_account' => '汇款账号',
            'amount' => '汇款金额',
            'contact' => '联系方式'
        ];
    }

    /**
     * 获取已定义验证规则的错误消息
     */
    public function messages(): array
    {
        return [
            'remittance_account.required' => '请输入汇款账号',
            'amount.required'  => '请输入汇款金额',
            'contact.required' => '请输入联系方式',
            'contact.mobile' => '请输入正确的手机号'
        ];
    }
}